<template>
  <div class="page-container">
    <Header></Header>

    <div class="main-container">
      <div class="content-grid">
        <!-- 左边栏 -->
        <div class="left-column">
          <ArticleList></ArticleList>
        </div>

        <!-- 右边栏 -->
        <div class="right-column">
          <div class="sidebar-content">
            <CategoryCard></CategoryCard>
            <TagCard></TagCard>
          </div>
        </div>
      </div>
    </div>

    <Footer />
  </div>
</template>

<script setup>
import Header from '@/layouts/components/Header.vue'
import CategoryCard from '@/components/CategoryCard.vue'
import TagCard from '@/components/TagCard.vue'
import ArticleList from '@/components/ArticleList.vue'
import Footer from '@/layouts/components/Footer.vue'
</script>

<style scoped>
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-container {
  flex: 1;
  max-width: 1230px;
  margin: 1.25rem auto 0;
  padding: 0 15px;
}

.content-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1rem;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* 右边栏样式 */
.sidebar-content {
  position: sticky;
  top: 5.25rem;
}
</style>